const state = {
  user: {},
  sDate: '',
  eDate: ''
}

const mutations = {
  SELECT_USER: (state, user) => {
    state.user = user
  },
  SET_APPIONTMENTDATE: (state, sDate) => {
    state.sDate = sDate
  },
  SET_AALERTNATDATE: (state, eDate) => {
    state.eDate
     = eDate
  }
}

const actions = {
  selectUser ({ commit }, user) {
    commit('SELECT_USER', user)
  },
  setAlternateDate ({ commit }, user) {
    commit('SET_AALERTNATDATE', user)
  },
  setAppointmentDate ({ commit }, user) {
    commit('SET_APPIONTMENTDATE', user)
  },
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}